package org.carpediem.conman.entity;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Mark Petrovic
 */
public abstract class DomainObjectBag<T> implements Iterable<T> {
    protected Set<T> bag = new HashSet<T>();

    public Set<T> getBag() {
        return bag;
    }

    public void setBag(Set<T> bag) {
        this.bag = bag;
    }

    public void add(T obj) {
        bag.add(obj);
    }
}
